home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / kernel / dev / sun4c.md / devConfig.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-19  |  2.9 KB  |  79 lines

  1. /* 
  2.  * devConfig.c --
  3.  *
  4.  *    Configuration table for the devices in the system.  There is
  5.  *    a table for the possible controllers in the system, and
  6.  *    then a table for devices.  Devices are implicitly associated
  7.  *    with a controller.  This file should be automatically generated
  8.  *    by a config program, but it isn't.
  9.  *
  10.  * Copyright 1989 Regents of the University of California
  11.  * Permission to use, copy, modify, and distribute this
  12.  * software and its documentation for any purpose and without
  13.  * fee is hereby granted, provided that the above copyright
  14.  * notice appear in all copies.  The University of California
  15.  * makes no representations about the suitability of this
  16.  * software for any purpose.  It is provided "as is" without
  17.  * express or implied warranty.
  18.  */
  19.  
  20. #ifndef lint
  21. static char rcsid[] = "$Header: /cdrom/src/kernel/Cvsroot/kernel/dev/sun4c.md/devConfig.c,v 1.5 91/10/18 01:20:02 dlong Exp $ SPRITE (Berkeley)";
  22. #endif not lint
  23.  
  24.  
  25. #include "sprite.h"
  26. #include "devAddrs.h"
  27. #include "devInt.h"
  28. #include "scsiC90.h"
  29. #include "devTypes.h"
  30. #include "scsiHBA.h"
  31.  
  32. /*
  33.  * Per device include files.
  34.  */
  35. /*
  36.  * The controller configuration table.
  37.  */
  38. DevConfigController devCntrlr[] = {
  39.    /* Name   Dev_Name Address ID InitProc   IntrVector  IntrRoutine. */
  40.    { "SCSIC90",  "esp", NIL, 0, DevSCSIC90Init, 3, DevSCSIC90Intr},
  41. };
  42. /*
  43.  * We want to treat the dma controller and scsi device as the same device,
  44.  * but the both must be mapped separately, so we give them separate entries,
  45.  * but with only one init routine.
  46.  */
  47. int devNumConfigCntrlrs = sizeof(devCntrlr) / sizeof(DevConfigController);
  48. /*
  49.  * Table of SCSI HBA types attached to this system.
  50.  */
  51.  
  52. ScsiDevice *((*devScsiAttachProcs[]) _ARGS_((Fs_Device *devicePtr,
  53.         void (*insertProc) (List_Links *elementPtr,
  54.                     List_Links *elementListHdrPtr)))) = {
  55.     DevSCSIC90AttachDevice,        /* SCSI Controller type 0. */
  56. };
  57. int devScsiNumHBATypes = sizeof(devScsiAttachProcs) / 
  58.              sizeof(devScsiAttachProcs[0]);
  59. /*
  60.  * A list of disk devices that is used when probing for a root partition.
  61.  * The choices are:
  62.  * SCSI Disk target ID 0 LUN 0 partition 0 on SCSIC90 HBA 0. 
  63.  * SCSI Disk target ID 0 LUN 0 partition 2 on SCSIC90 HBA 0. 
  64.  * SCSI Disk target ID 0 LUN 0 partition 6 on SCSIC90 HBA 0. 
  65.  */
  66. Fs_Device devFsDefaultDiskPartitions[] = { 
  67.     { -1, SCSI_MAKE_DEVICE_TYPE(DEV_SCSI_DISK, DEV_SCSIC90_HBA, 0, 0, 0, 2),
  68.           SCSI_MAKE_DEVICE_UNIT(DEV_SCSI_DISK, DEV_SCSIC90_HBA, 0, 0, 0, 2),
  69.     (ClientData) NIL },
  70.     { -1, SCSI_MAKE_DEVICE_TYPE(DEV_SCSI_DISK, DEV_SCSIC90_HBA, 0, 0, 0, 0),
  71.           SCSI_MAKE_DEVICE_UNIT(DEV_SCSI_DISK, DEV_SCSIC90_HBA, 0, 0, 0, 0),
  72.     (ClientData) NIL },
  73.     { -1, SCSI_MAKE_DEVICE_TYPE(DEV_SCSI_DISK, DEV_SCSIC90_HBA, 0, 0, 0, 6),
  74.           SCSI_MAKE_DEVICE_UNIT(DEV_SCSI_DISK, DEV_SCSIC90_HBA, 0, 0, 0, 6),
  75.     (ClientData) NIL },
  76.   };
  77. int devNumDefaultDiskPartitions = sizeof(devFsDefaultDiskPartitions) / 
  78.               sizeof(Fs_Device);
  79.